﻿using SqlPerfomance.V2.Tests.Code;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SqlPerfomance.V2.Tests
{
    public class TableNameFactory
    {
        public static string GetTableName(EnumHierarchyTestType type)
        {
            switch(type)
            {
                case EnumHierarchyTestType.AdjancyList: return ConfigurationManager.AppSettings["AdjancyListTreeNode"];
                case EnumHierarchyTestType.MaterializedPath: return ConfigurationManager.AppSettings["MaterializedPathTreeNode"];
                case EnumHierarchyTestType.NestedSet: return ConfigurationManager.AppSettings["NestedSetTreeNode"];
                default: throw new InvalidOperationException("Неизвестный тип хранения данных");
            }
        }
    }
}
